<%@page import="entities.MetaSeo"%>
<%@page import="java.util.TreeMap"%>
<%@page import="helpers.UrlHelper"%>

<%
TreeMap<String, String> check = (TreeMap<String, String>) request.getAttribute("check");
MetaSeo metaseo = (MetaSeo) request.getAttribute("metaseo");
String name = (String) request.getAttribute("name");
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/admin/layouts/header.jsp" />

<script  type="text/javascript" src="/admin/js/custom/meta_seo_form.js"></script>
<script type="text/javascript">
<!--
var name = "<%=name%>";
//-->
</script>
				
				<jsp:include page="/admin/elements/heading_panel.jsp" />

                <!-- Build page from here: -->
                <div class="row-fluid">
					<div class="span12">
						<jsp:include page="/admin/elements/message_box.jsp" />
					
                    	<div class="box">
                        	<div class="title">
                            	<h4> 
                                	<span>Page <%=name %></span>
                            	</h4>
							</div>
							<ul class="nav nav-tabs hide">
                                 <li class="active"><a href="#tab-common" data-toggle="tab">Page <%=name %></a></li>
                                 <li><a href="#tab-info" data-toggle="tab">View Info</a></li>
                             </ul>

							 <form class="form-horizontal" method="post">
	                             <div class="tab-content">
	                                 <!-- #tab-common -->
	                                 <div class="tab-pane fade in active" id="tab-common">       
		                                <div class="form-row row-fluid">
		                                	<div class="span12">
		                                    	<div class="row-fluid">
		                                        	<label class="form-label span3" for="normal">Meta Title</label>
		                                            <input type="text" name="title" class="span9 <%=check.get("title") != null ? "error" : "" %>" value="<%=metaseo.getTitle()%>" />
		                                            <% if (check.get("title") != null) { %>
		                                            <label class="error" for="required" generated="true"><%=check.get("title") %></label>
		                                            <% } %>
												</div>
											</div>
										</div>
										
										<div class="form-row row-fluid">
		                                	<div class="span12">
		                                    	<div class="row-fluid">
		                                        	<label class="form-label span3" for="normal">Meta Keywords</label>
		                                            <input type="text" name="keywords" class="span9 <%=check.get("keywords") != null ? "error" : "" %>" value="<%=metaseo.getKeywords()%>" />
		                                            <% if (check.get("keywords") != null) { %>
		                                            <label class="error" for="required" generated="true"><%=check.get("keywords") %></label>
		                                            <% } %>
												</div>
											</div>
										</div>
										
										<div class="form-row row-fluid">
		                                	<div class="span12">
		                                    	<div class="row-fluid">
		                                        	<label class="form-label span3" for="normal">Meta Description</label>
		                                        	<div class="controls-textarea span9">
			                                            <textarea name="description" class="span12 tinymce <%=check.get("description") != null ? "error" : "" %>" rows="6"><%=metaseo.getDescription() %></textarea>
			                                            <% if (check.get("description") != null) { %>
			                                            <label class="error" for="required" generated="true"><%=check.get("description") %></label>
			                                            <% } %>
			                                        </div>
												</div>
											</div>
										</div>
										
										<div class="form-row row-fluid">
		                                	<div class="span12">
		                                    	<div class="row-fluid">
		                                        	<label class="form-label span3" for="normal">OgUrl</label>
		                                            <input type="text" name="ogurl" class="span9 <%=check.get("ogurl") != null ? "error" : "" %>" value="<%=metaseo.getOgurl()%>" />
		                                            <% if (check.get("ogurl") != null) { %>
		                                            <label class="error" for="required" generated="true"><%=check.get("ogurl") %></label>
		                                            <% } %>
												</div>
											</div>
										</div>
										
										<div class="form-row row-fluid">
		                                	<div class="span12">
		                                    	<div class="row-fluid">
		                                        	<label class="form-label span3" for="normal">OgImage</label>
		                                            <input type="text" name="ogimage" class="span9 <%=check.get("ogimage") != null ? "error" : "" %>" value="<%=metaseo.getOgurl()%>" />
		                                            <% if (check.get("ogimage") != null) { %>
		                                            <label class="error" for="required" generated="true"><%=check.get("ogimage") %></label>
		                                            <% } %>
												</div>
											</div>
										</div>                                         
	                                 </div>
	                                 <!-- #tab-common END -->
	                                 
	                                 <!-- #tab-info -->
	                                 <div class="tab-pane fade" id="tab-info">
	                                     <div class="form-row row-fluid">
		                                	<div class="span12">
		                                    	<div class="row-fluid">
		                                        	<label class="form-label span3" for="normal">Info Meta Title</label>
		                                            <input type="text" name="titleInfo" class="span9 <%=check.get("titleInfo") != null ? "error" : "" %>" value="<%=metaseo.getTitleInfo()%>" />
		                                            <% if (check.get("titleInfo") != null) { %>
		                                            <label class="error" for="required" generated="true"><%=check.get("titleInfo") %></label>
		                                            <% } %>
												</div>
											</div>
										</div>
										
										<div class="form-row row-fluid">
		                                	<div class="span12">
		                                    	<div class="row-fluid">
		                                        	<label class="form-label span3" for="normal">Meta Keywords Info</label>
		                                            <input type="text" name="keywordsInfo" class="span9 <%=check.get("keywordsInfo") != null ? "error" : "" %>" value="<%=metaseo.getKeywordsInfo()%>" />
		                                            <% if (check.get("keywordsInfo") != null) { %>
		                                            <label class="error" for="required" generated="true"><%=check.get("keywordsInfo") %></label>
		                                            <% } %>
												</div>
											</div>
										</div>
										
										<div class="form-row row-fluid">
		                                	<div class="span12">
		                                    	<div class="row-fluid">
		                                        	<label class="form-label span3" for="normal">Meta Description Info</label>
		                                        	<div class="controls-textarea span9">
			                                            <textarea name="descriptionInfo" class="span12 tinymce <%=check.get("descriptionInfo") != null ? "error" : "" %>" rows="6"><%=metaseo.getDescriptionInfo() %></textarea>
			                                            <% if (check.get("descriptionInfo") != null) { %>
			                                            <label class="error" for="required" generated="true"><%=check.get("descriptionInfo") %></label>
			                                            <% } %>
			                                        </div>
												</div>
											</div>
										</div>
										
										<div class="form-row row-fluid">
		                                	<div class="span12">
		                                    	<div class="row-fluid">
		                                        	<label class="form-label span3" for="normal">Info OgUrl</label>
		                                            <input type="text" name="ogurlInfo" class="span9 <%=check.get("ogurlInfo") != null ? "error" : "" %>" value="<%=metaseo.getOgurlInfo()%>" />
		                                            <% if (check.get("ogurlInfo") != null) { %>
		                                            <label class="error" for="required" generated="true"><%=check.get("ogurlInfo") %></label>
		                                            <% } %>
												</div>
											</div>
										</div>
										
	                                 </div>
	                                 <!-- #tab-info END -->
	                             </div>
	                             
	                             <div class="content">
	                             	<div class="form-actions">
		                                	<button type="submit" class="btn btn-info">Save</button>
		                                    <button type="reset" class="btn">Reset</button>
										</div>  
	                             </div>
                             </form>
						</div><!-- End .box -->

					</div><!-- End .span12 -->

				</div><!-- End .row-fluid -->
				
				<jsp:include page="/admin/elements/content_replate_text.jsp" />
                
<jsp:include page="/admin/layouts/footer.jsp" />